<template>
	<div class="merak-container-has-aside" curPageName="employee-list">
	  <div class="merak-aside">
	    <div class="merak-overflow-y">
	      
	    </div>
	  </div>
	  <div v-waterMarker class="merak-card merak-container-has-search" curPageName="employee-list">
	    <!-- 表格组件 -->
		<div style="display: flex;">
			<el-button class="button_list" type="primary" @click="state.addOne = true">企发新增</el-button>
			<el-button class="button_list" type="primary" @click="state.addTwo = true">清关新增</el-button>
		</div>
	    <div class="merak-table-wrapper">
			
	    </div>
	  </div>
	  <Transition name="fade" mode="out-in">
		<AddCard v-if="state.addOne" @close="handleCloseAdd" :goodsId="709"/>
	    <!-- <AddQifa v-if="state.addOne" @close="handleCloseAdd" :type="RouteType.consumer" /> -->
		<!-- <AddMerge v-if="state.addOne" @close="handleCloseAdd" :type="RouteType.consumer"/> -->
		<!-- :propId="1008" :typeId="1" -->
	  </Transition>
	  <Transition name="fade" mode="out-in">
	    <AddClearance v-if="state.addTwo" @close="handleCloseAdd" :type="RouteType.consumer"/>
	  </Transition>
	  
	</div>
</template>

<script setup lang="ts" name="documentCard">
	import { reactive } from "vue";
	import AddCard from "./components/AddCard.vue";
	import AddMerge from "./components/AddMerge.vue";
	import AddQifa from "./components/AddQifa.vue";
	import AddClearance from "./components/AddClearance.vue";
	import { RouteType } from "@/api/modules/goodsArchive/allocation";
	
	const state = reactive<{
		addOne?:boolean;
		addTwo ?: boolean;
	}>({
		addOne:true,
		addTwo: false,
	})
	
	const handleCloseAdd = () => {
	  state.addOne = false;
	  state.addTwo = false;
	};
	// import { useRouter } from "vue-router";
	// const router = useRouter();
	// const goPage =()=>{
	// 	//假设你想添加的参数是name和value
	// 	const name = 'name';
	// 	const value = '123';
		 
	// 	// 构建新的URL
	// 	const newUrl = new URL(window.location.href);
	// 	//console.log(newUrl)
	// 	newUrl.searchParams.set(name, value);
	// 	// 使用pushState更新浏览器历史记录
	// 	window.history.pushState({}, '', newUrl.toString());
	// }
</script>

<style scoped lang="scss">
@import "./index.scss";
</style>
